export default function (Vue) {

    Vue.prototype.systemRequest = {};
    var systemRequest = Vue.prototype.systemRequest;

    // 获取菜单树
    systemRequest.menuTree = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/menu/tree', 'GET', paramData, callBack, headers);
    };

    // 添加菜单
    systemRequest.addMenu = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/menu', 'POST', paramData, callBack, headers);
    };

    // 修改菜单
    systemRequest.modifyMenu = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/menu', 'PUT', paramData, callBack, headers);
    };

    // 删除菜单
    systemRequest.deleteMenu = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/menu', 'DELETE', paramData, callBack, headers);
    };

    // 获取部门树
    systemRequest.deptTree = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/dept/tree', 'GET', paramData, callBack, headers);
    };

    // 添加部门
    systemRequest.addDept = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/dept', 'POST', paramData, callBack, headers);
    };

    // 修改部门
    systemRequest.modifyDept = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/dept', 'PUT', paramData, callBack, headers);
    };

    // 删除部门
    systemRequest.deleteDept = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/dept', 'DELETE', paramData, callBack, headers);
    };

    // 获取管理员列表
    systemRequest.getAdmins = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/admins', 'GET', paramData, callBack, headers);
    };

    // 添加管理员
    systemRequest.addAdmin = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/admin', 'POST', paramData, callBack, headers);
    };

    // 修改管理员
    systemRequest.modifyAdmin = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/admin', 'PUT', paramData, callBack, headers);
    };

    // 获取获取所有角色
    systemRequest.getAllRoles = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/roles-all', 'GET', paramData, callBack, headers);
    };

    // 获取角色列表
    systemRequest.getRoles = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/roles', 'GET', paramData, callBack, headers);
    };

    // 添加角色
    systemRequest.addRole = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/role', 'POST', paramData, callBack, headers);
    };

    // 修改角色
    systemRequest.modifyRole = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/role', 'PUT', paramData, callBack, headers);
    };

    // 获取角色已分配的菜单id集合
    systemRequest.roleHasMenuIds = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/role/menu', 'GET', paramData, callBack, headers);
    };

    // 角色分配菜单
    systemRequest.roleCheckMenu = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/role/menu', 'PUT', paramData, callBack, headers);
    };

    // 获取所有省
    systemRequest.getProvinces = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/area/province', 'GET', paramData, callBack, headers);
    };

    // 获取省下所有市
    systemRequest.getCities = function (current_node, paramData, callBack, headers) {
        Vue.prototype.baseHttpClient.execute(current_node, '/system/area/city', 'GET', paramData, callBack, headers);
    };
}